const PlayerControl = require('PlayerControl');
const InsectManager = require('InsectManager');

cc.Class({
    extends: cc.Component,

    properties: {
        road0:0,
        road1:0,
        road2:0,
        road3:0,
        road4:0,
        road5:0,

    // player 节点，用于获取主角弹跳的高度，和控制主角行动开关
    player: {
        default: null,
        type: PlayerControl
    },

    // score label 的引用
    scoreDisplay: {
        default: null,
        type: cc.Label
    },

    insectManager:{
        default:null,
        type : InsectManager
    }

},

    // LIFE-CYCLE CALLBACKS:

    onLoad () {
        this.Init();
    },

    Init:function(){
        
        this.roadDic =new Array(this.road0,this.road1,this.road2,this.road3,this.road4,this.road5);
        this.isGaming = false;
        this.player.Init(this);
        this.insectManager.Init(this);
    },

    start () {

    },

    update (dt) {},

    onStartGame:function(){},
    gainScore:function(){},
    resetScore:function(){},
    gameOver:function(){},
});
